ImageGear Professional for Linux
Non-Image Data Format

The key thing of non-image data processing in ImageGear is a uniform data format that is used to convert to and from the format filter. As soon as the format filter decodes the data fields one after another during the loading operation, and encodes it in the reverse direction during the saving operation, all data consists of the set of items where each item is a minimal atom of information. The order of items is fixed, and the format filter processes item after item in the given order. The same order is used when data is passed through the stream.

The low-level format of the data consists of the list of items where each item represents a minimal unit of information. Each item also should have some unique name that allows you to connect it with the physical value inside of the file format. The definition of the data item can be described by the following fields:

 
Copy Code
typedef struct tagAT_DATALIST_ITEM{
    AT_MODE        FormatID
    LPCHAR         Name;
    DWORD         Id;
    AT_MODE         Type;
    LPVOID         Value;
    AT_MODE         ValueType;
    DWORD         Length;
    AT_MODE         ValueAccessMode;
    }AT_DATALIST_ITEM;

Please see the descriptions of these fields below:

FormatID The ID of the filter that reads or writes a file (IG_FORMAT_... constant value).
Name The name of the item. Can be any string value.
Id Numerical ID of item. Can be any value of DWORD size.
Type Specifies the type of item and reflects the status of the given record. Possible values are:
  • IG_METAD_VALUE_ITEM - this value specifies that the current item is a value of the simplest type, and the field Value contains the actual value of the item, and ValueType contains the identifier of the type of this item. ReadOnly can be either TRUE (read-only) or FALSE (read/ write). Name and/or Id contains textual and numerical identification of the item.
  • IG_METAD_LEVEL_START - this value specifies that the current item opens the sublevel of items and all the next items up to the corresponding item with the LEVEL_END value belonging to this sublevel.
  • IG_METAD_LEVEL_END - this value closes the current sublevel and tells that next item belongs to a higher level.
Value Contains the value of the item when Type = IG_METAD_VALUE_ITEM. Note that possible values of this field are fixed and define the exact list of allowed data types. It also depends on the ImageGear platform and FLTR.METADATA_FORMAT global control parameter. This global parameter has two allowed values: "text" and "binary". See the section Metadata Structure "ValueType" and "Value" for possible values.
ValueType Contains the type identifier of the item when Type = IG_METAD_VALUE_ITEM. Possible values of this field are fixed and define the exact list of allowed data types. See the section Metadata Structure "ValueType" and "Value" for possible values.
Length

Identifies the number of values to be written.

  • For AM_TID_TXT_STRING it should indicate the number of characters in the string, excluding last null character (basically the length of the string).
  • For AM_TID_RAW_DATA it should indicate the number of bytes that the raw data occupies.
  • For the rest of the types it should indicate the number of values of the type, which textual representation is encoded into "Value".
ValueAccessMode Identifies whether data can be changed or not. "Read only" value means that its value is information only and cannot be changed after setting the initial value. It also means that its value will be ignored during a WRITE operation.

So, this data structure allows you to "linearize" hierarchical and complex data into an array of simplest data types.

You can transfer different non-image data using the general data structure described in this section. Please see Non-Image Data Storage.

 

 


©2016. Accusoft Corporation. All Rights Reserved.

Send Feedback